<?php
/*
* Class teia\webdev\php\core\IPaginationDataSource
* Core interface for providing data to a PaginationProvider
*
* @author Bernardo Quibiana
* @date created: 20111122
*
* @date modified: 20111122
* @modified: Bernardo Quibiana
*/

// namespace declaration: Abstract Data Types
namespace teia\webdev\php\core;

interface IPaginationDataSource {
	
	/*
	 * Data
	 */
	
	/**
	 * Return the total number of items to display
	 * @return number the number of items
	 */
	public function get_num_items();
	
	/**
	 * Return the total number of pages to display
	 * @return number the number of pages
	 */
	public function get_num_pages();
	
	/**
	 * Return the number of items to display per page
	 * @return number the number of items per page
	 */
	public function get_page_size();
	
	
	/**
	 * Return the content of the specified item to display
	 * @param number $it_num global item number
	 * @param number $page_num page number
	 * @return string item content to display
	 */
	public function get_item_content($it_num, $page_num);
	
	/**
	 * Return the content of the specified page number to display
	 * @param number $page_num page number
	 * @return string text content of the target page to display
	 */
	public function get_page_content($page_num);
		
}

?>